<div class="common_form"    >

			 <table cellpadding="0" >
				<tbody>

					<tr>
					<td>
						<?php $this->widget('ext.autowidget'); ?>
						<input type="text" class="autokey" id='search'  />
						&nbsp;&nbsp;
					    <input type="button" class="default_btn" id='submit'  value="搜索"/>
					    
					</td>
					</tr>

					<tr>
					<td>
						<div id="piclist"></div>
						
					</td>
					</tr>
				                    					
				</tbody>
			</table>
</div>
<style >
.showpic{float:left;margin-left:12px;display:inline-block;margin-top:10px;cursor:pointer;position:relative;}
.showpic a{width:100%;height:100%;position:absolute;z-index:5;left:0;background:url('/admin/ubutton/ubutton/assets/images/bg06.png') repeat;}
.showpic .active{background-color:#FFF;opacity:0.5;filter:alpha(opacity=50);}
</style>
<script type="text/javascript">
        $("#submit").bind("click",function(){
        	     var value=$.trim($("#search").val());
        	     var str="";
        	     var result="";
        	     if(value.length==0) alert("请输入关键词！");
                 else{
                 	$.getJSON("/admin/ubutton/ubutton/getpiclist?keyword="+value+"",function(data){
                                 for(var i=0;i<data.length;i++){
                                         
                                        str+='<div class="showpic"><img src="'+data[i]['indexpicpic']+'" class="showimg" width="120" height="90"/><a href="javascript:void(0)" id="'+data[i]['indexpicpic']+'" ></a></div>';

                                 }
                                 if(parseInt(data)==0) $("#piclist").html("<div style='width:200px;height:100px;line-height:100px;font-weight:bold;font-size:20px;color:#F00;margin:0 auto;'>没有找到相关图片</div>");
                                 else $("#piclist").html(str);
                                 	     	 
                   });
                 }
        });
        $("body").delegate(".showpic","click",function(){
                 $(".showpic a").attr("class","");
                 $(this).find("a").attr("class","active");
        });
        
</script>